<?php
// 初始化表单字段
return [
    // 自增id
    'id' => [
        'type' => 'BIGINT',
        'command' => "bigint primary key auto_increment not null COMMENT 'id'",
        'default' => 0,
        'desc' => '自增id',
        'length' => 1e8
    ],
    // 字段外键
    'uuid' => [
        'type' => 'STRING',
        'command' => "varchar(255) not null default '0' COMMENT 'uuid 外键'",
        'default' => '0',
        'desc' => '字段外键',
        'length' => '255'
    ],
    // 所属模型id
    'form_id' => [
        'type' => 'BIGINT',
        'command' => "bigint not null default 0 COMMENT '所属模型id'",
        'default' => 0,
        'desc' => '所属模型id',
        'length' => 1e8
    ],
    // 关联外键
    'foreign_uuid' => [
        'type' => 'SELECT',
        'command' => "varchar(255) not null default '0' COMMENT '关联外键'",
        'default' => '0',
        'desc' => '关联外键',
        'length' => '255'
    ],
    // 评论开关
    'reply_enable' => [
        'type' => 'SWITCH',
        'command' => "smallint not null default 1 COMMENT '是否开启评论'",
        'default' => 1,
        'desc' => '评论状态',
        'length' => 6
    ],
    // 创建人
    'create_by' => [
        'type' => 'BIGINT',
        'command' => "bigint not null default 0 COMMENT '创建人Id'",
        'default' => 0,
        'desc' => '创建人Id',
        'length' => 1e8
    ],
    // 点赞次数
    'likes' => [
        'type' => 'INT',
        'command' => "int not null default 0 COMMENT '点赞次数'",
        'default' => 0,
        'desc' => '点赞次数',
        'length' => 1e8
    ],
    // 浏览次数
    'visits' => [
        'type' => 'INT',
        'command' => "int not null default 0 COMMENT '浏览次数'",
        'default' => 0,
        'desc' => '浏览次数',
        'length' => 1e8
    ],
    'reply_count' => [
        'type' => 'INT',
        'command' => "int not null default 0 COMMENT '评论条数'",
        'default' => 0,
        'desc' => '评论条数',
        'length' => 1e8
    ],
    // 表状态
    'status' => [
        'type' => 'SWITCH',
        'command' => "smallint  not null default 1 COMMENT '表状态'",
        'default' => 1,
        'desc' => '表状态',
        'length' => 6
    ],
    // 创建时间
    'create_time' => [
        'type' => 'STRING',
        'command' => "varchar(255) NOT NULL DEFAULT '0' COMMENT '创建时间'",
        'default' => '0',
        'desc' => '创建时间',
        'length' => '255'
    ],
    // 更新时间
    'update_time' => [
        'type' => 'STRING',
        'command' => "varchar(255) NOT NULL DEFAULT '0' COMMENT '更新时间'",
        'default' => '0',
        'desc' => '更新时间',
        'length' => '255'
    ]
];